home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Magazin: Amiga-CD 1996 September & October
/
Amiga-CD 1996 #9-10.iso
/
aminet
/
7-96
/
lha-archive
/
aspell.lha
/
AlphaSpell
/
REXX
/
merge.asp
< prev
next >
Wrap
Text File
|
1996-05-01
|
1KB
|
59 lines
/* merge.asp */
ARG pat
ADDRESS ALPHASPELL
OPTIONS RESULTS
n = FileList(pat, files, "F", "E")
i = 1
x = 1
DO WHILE x <= n
first = files.x
x = x + 1
IF x > n THEN second = first
ELSE DO
second = files.x
x = x + 1
END
dest = "words" || i || ".amd"
i = i + 1
"MERGE" first second dest
IF RC == 0 THEN DO
CALL DelDict(first)
IF first ~= second THEN CALL DelDict(second)
END
END
DO FOREVER
n = FileList("*.amd", files, "F", "E")
IF n == 1 THEN LEAVE
x = 1
DO WHILE x <= n
first = files.x
x = x + 1
IF x > n THEN second = dest
ELSE DO
second = files.x
x = x + 1
END
dest = "words" || i || ".amd"
i = i + 1
"MERGE" first second dest
IF RC == 0 THEN DO
CALL DelDict(first)
CALL DelDict(second)
END
END
END
"QUIT"
EXIT
DelDict: PROCEDURE
ARG file
CALL Delete(file)
file = Left(file, Length(file)-1) || x
IF Exists(file) THEN CALL Delete(file)
RETURN